package net.zdreamer.shunyi.ui.myinfo;

import android.app.Activity;
import android.content.Intent;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import net.zdreamer.shunyi.R;
import net.zdreamer.shunyi.ui.fragment.PanhangActivity;

public class MyBanghuiActivity extends Activity implements View.OnClickListener {
    private ImageView back, chuangjian, paihang, chazhao;
    private RelativeLayout titlitem;
    private TextView titlecontent;
    private Intent intent;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_my_banghui);
        init();
    }

    private void init() {
        titlitem = (RelativeLayout) findViewById(R.id.title_item);
        back = (ImageView) findViewById(R.id.leftimg);
        chuangjian = (ImageView) findViewById(R.id.chuangjian);
        paihang = (ImageView) findViewById(R.id.paihang);
        chazhao = (ImageView) findViewById(R.id.chazhoa);
        back.setImageResource(R.drawable.backimg);
        titlitem.setBackgroundResource(R.drawable.newsbiaoti);
        titlecontent = (TextView) findViewById(R.id.title_content);
        titlecontent.setText("我的帮");
        titlecontent.setTextColor(getResources().getColor(R.color.white));

        chuangjian.setOnClickListener(this);
        chazhao.setOnClickListener(this);
        paihang.setOnClickListener(this);

    }


    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.chuangjian:
                intent = new Intent(this, BuildBanghuiActivity.class);
                startActivity(intent);
                break;
            case R.id.chazhoa:
                intent = new Intent(this, SearchActivity.class);
                startActivity(intent);
                break;
            case R.id.paihang:
                intent = new Intent(this, PanhangActivity.class);
                startActivity(intent);
                break;
            default:
                break;
        }
    }
}
